"""AppImage rules for Bazel."""

module(
    name = "rules_appimage",
    version = "1.6.0",
)

bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True)
bazel_dep(name = "platforms", version = "0.0.8")
bazel_dep(name = "rules_cc", version = "0.0.9", dev_dependency = True)
bazel_dep(name = "rules_python", version = "0.27.1")

rules_appimage = use_extension("//:extensions.bzl", "appimage_ext_dependencies")
use_repo(
    rules_appimage,
    "appimage_runtime_aarch64",
    "appimage_runtime_i386",
    "appimage_runtime_armv7e-m",
    "appimage_runtime_x86_64",
    "appimagetool.png",
    "squashfs-tools",
)

register_toolchains("//appimage:all")

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(python_version = "3.11")
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
    hub_name = "rules_appimage_py_deps",
    python_version = "3.11",
    requirements_lock = "//:requirements.txt",
)
use_repo(pip, "rules_appimage_py_deps")
